package pers.zh.parking.mvp.ui.adapter;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import pers.zh.parking.R;
import pers.zh.parking.data.entity.Car;

public class CarsPopAdapter extends BaseQuickAdapter<Car, BaseViewHolder> {

    public CarsPopAdapter(@Nullable List<Car> data) {
        super(R.layout.pop_item_car, data);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, Car item) {
        helper.setText(R.id.tvCarNo, item.getCarNo())
              .setText(R.id.tvCarBrand, item.getCarBrand())
              .setText(R.id.tvCarColor, item.getCarColor());
    }
}
